package cn.itheima.service.system.impl;

import cn.itheima.dao.UserRepository;
import cn.itheima.domain.system.User;
import cn.itheima.service.system.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by millions on 2017/7/20.
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserRepository userRepository;

    @Override
    public void login(User model) {
        userRepository.findByUsernameAndPassword(model.getUsername(),model.getPassword());

    }

    @Override
    public User findByUsername(String username) {
        return userRepository.findByUsername(username);
    }
}
